package com.ftg.learn.chapter08.homework01;

/**
 * 测试类
 *
 * @author lijiaxin
 * @version 1.0
 * @date 2023/7/24 9:45
 */

public class Play {

    public static void main(String[] args) {
        Rabbit r = new Rabbit();
        r.setName("小白兔");

        Animal centipede = new Centipede();
        centipede.setName("小蜈蚣");

        r.call(centipede,"来大灰狼家里吃饭");
        System.out.println("一个星期过去了");
        r.call(centipede,"小蜈蚣让小白兔和大灰狼再等她一个星期");
    }
}
